import axios from "axios";
axios.defaults.baseURL = 'http://127.0.0.1:8080/'   /* 网络请求的基本路径 */
const doGet = (url:string, data?:object) => axios.get(url,data)/* 查询 */
const doPost = (url:string, data:object) => axios.post(url,data)/* 新增 */
const doPut = (url:string, data:object) => axios.put(url,data)   /* 修改 */
const doPatch = (url:string, data:object) => axios.patch(url,data)/* 局部修改 */
const doDelete = (url:string) => axios.delete(url) /* 删除 */

export {
    doGet,doPost,doPut,doDelete,doPatch
}